import { Controller, Get, Post, Body, Patch, Param, Delete, UseInterceptors, UploadedFile } from '@nestjs/common';
import { UploadService } from './upload.service';
import { FileInterceptor } from '@nestjs/platform-express'

@Controller('upload')
export class UploadController {
    constructor(private readonly uploadService: UploadService) { }
    @Post('img')
    @UseInterceptors(FileInterceptor('file'))
    upload(@UploadedFile() file) {
        console.log(file);
        console.log(decodeURIComponent(escape(file.originalname)))
        // return true
    }
}